<template>
    <view class="bet-panel" style="z-index: 22;">
		<view class="bet-notice" v-if="showBetMoney">
			投注金额：{{betMoney}}
		</view>
        <view class="freeAddress" :class="noFree ? 'noFree' : ''" @click="setStopBet()">
			<image src="../../static/img/live/free.png" mode="" v-if="!noFree" style="height: 56rpx;"></image>
			<image src="../../static/img/live/free3.png" mode="" v-if="noFree" style="height: 56rpx;"></image>
        </view>
        <view class="bet-box" :class="{'bet-box2': noFree}">
            <!-- 上半部分桌面 -->
            <view class="row" style="border-bottom:1px solid #556688 ;">
                <view :class="target.className" v-for="(target,targetIndex) in betTargetList.slice(0,3)"
                    :key="targetIndex" @click="bet(target)">
                    <!-- <view class="title" >{{target.label}}</view> -->
                    <view class="odds">
						<image :src="target.imgUrl" mode="" style="width: 80rpx;height: 90rpx;"></image>
					</view>
                    <view class="chip"
                        :style="{transform: target.className=='bet-big' ? 'skew(20deg)' : target.className=='bet-small' ? 'skew(-20deg)' : 'none'}">
                        <view class="chip-item" v-for="(chip,chipIndex) in target.showChip"
                            :key="chip.color+'0'+chipList + chipIndex"
                            :style="{backgroundColor: chip.color, bottom: chipIndex*8+'rpx',zIndex: chipIndex}">
                            <view class="chip-item-bg">
                                {{ chip.val }}
                            </view>
                            <view class="betAmount" v-if="target.showChip.length -1 == chipIndex"
                                :style="{bottom: chipIndex*8+50+'rpx'}">{{ target.betAmount }}</view>
                        </view>
                    </view>
                    <view class="total_amount" v-if="target.total_amount">
                        <!-- <u-icon name="rmb-circle-fill" size="24" color="#ebd093"></u-icon> -->
                        <!-- <text>{{ target.total_amount }}</text> -->
                    </view>
                    <view class="total_population" v-if="target.total_population">
                        <!-- <u-icon name="account" size="24" color="#ebd093"></u-icon> -->
                        <!-- <text>{{ target.total_population }}</text> -->
                    </view>
                </view>
            </view>
            <!-- 下半部分桌面 -->
            <view class="row">
                <view :class="target.className" v-for="(target,targetIndex) in betTargetList.slice(3,6)"
                    :key="targetIndex" @click="bet(target)">
                    <view class="title"></view>
					<!-- <view class="odds" v-if="target.id!=8">
					</view>
                    <view class="odds" v-if="target.id==8">
					</view> -->
					<view class="odds">
						<image :src="target.imgUrl" :class="{'bet-zhuang-sizi':targetIndex==2}" mode="" style="width: 80rpx;height: 90rpx;"></image>
						<view class="" v-if="targetIndex==2 && noFree">
							1:0.95
						</view>
						<view class="" v-if="targetIndex==2 && !noFree">
							1:1
						</view>
					</view>
					<view class="bat-zhuang-six" v-if="targetIndex == 2&&!noFree">
						<view class="">
							庄6点赢
						</view>
						<view class="">
							1:0.5
						</view>
					</view>
                    <view class="chip">
                        <view class="chip-item" v-for="(chip,chipIndex) in target.showChip"
                            :key="chip.color+'0'+chipList + chipIndex"
                            :style="{backgroundColor: chip.color, bottom: chipIndex*8+'rpx'}">
                            <view class="chip-item-bg">
                                {{ chip.val }}
                            </view>
                            <view class="betAmount" v-if="target.showChip.length -1 == chipIndex"
                                :style="{bottom: chipIndex*8+50+'rpx'}">{{ target.betAmount }}</view>
                        </view>
                    </view>

                    <view class="total_amount" v-if="target.total_amount">
                        <!-- <u-icon name="rmb-circle-fill" size="24" color="#ebd093"></u-icon> -->
                        <!-- <text>{{ target.total_amount > 1000 ? `${target.total_amount / 1000}k` :  target.total_amount}}</text> -->
                    </view>
                    <view class="total_population" v-if="target.total_population">
                        <!-- <u-icon name="account" size="24" color="#ebd093"></u-icon> -->
                        <!-- <text>{{ target.total_population }}</text> -->
                    </view>
                </view>
            </view>
        </view>
        <view class="bet-select">
            <view class="chip-list">
                <view class="chip-item" v-for="(chipItem, index) in chipList" :key="index"
                    :style="{backgroundColor: chipItem.color}"
                    :class="nowSelect == chipItem.val ? 'chip-item-avtive' : ''" @click="nowSelect = Number(chipItem.val)">
					<view class="bat-chip-mask" v-if="nowSelect != chipItem.val" >
						
					</view>
                    <view class="chip-item-bg">
                        {{ chipItem.text }}
                    </view>
                </view>
            </view>
            <view class="bet-btns">
                <view class="btn reset">
                    <view class="icon-box">
                        <u-icon name="reload" color="#ebd093" size="24"></u-icon>
                    </view>
                    <view class="btn-text" @click="repeatBet">
                        重复下注
                    </view>
                </view>
                <view class="btn determine" @click="confirm">
                    <view class="icon-box">
                        <u-icon name="checkmark-circle" size="24" color="#fff"></u-icon>
                    </view>
                    <view class="btn-text">
						确&nbsp;&nbsp;&nbsp;&nbsp;定
                    </view>
                </view>
                <view class="btn cancel" @click="cancel">
                    <view class="icon-box">
                        <u-icon name="close-circle" size="24" color="#fff"></u-icon>
                    </view>
                    <view class="btn-text">
                        取&nbsp;&nbsp;&nbsp;&nbsp;消
                    </view>
                </view>
                <view class="logo" @tap="handleChoice()"></view>
            </view>
        </view>
    </view>
</template>

<script>
    import api from "@/api/table"
    import user from "@/api/api"
	import chips from './allChipList.js'
	
	const allChips = chips.allChips
	
    export default {
		props:['choiceChips','betState','endState','tableDataInfo'],
        data() {
            return {
				// 投注信息
                betTargetList: [
				// {
    //                 id: 0,
    //                 label: '大',
    //                 value: 'big',
    //                 className: 'bet-big',
				// 	color:'white',
				// 	textShadow: '3px 2px 2px red',
    //                 odds: '',
    //                 betAmount: 0,
    //                 showChip: [],
    //             }, 
				{
                    id: 0,
                    label: '闲对',
                    value: 'idle-Pair',
                    className: 'bet-idle-Pair',
					color:'white',
					imgUrl: '/static/img/live/xian_pair.png',
					textShadow: '0 0 blue',
                    odds: '',
                    betAmount: 0,
                    showChip: [],
                    total_amount: 0,
                    total_population: 0,
                }, {
                    id: 1,
                    label: '幸运6',
                    value: 'lucky',
                    className: 'bet-lucky',
					imgUrl: '/static/img/live/lucky.png',
					color:'white',
					textShadow: '0 0 blue',
                    odds: '',
                    betAmount: 0,
                    showChip: [],
                }, {
                    id:2,
                    label: '庄对',
                    value: 'zhuang-Pair',
                    className: 'bet-zhuang-Pair',
					color:'white',
					textShadow: '0 0 blue',
					imgUrl: '/static/img/live/zhuang_pair.png',
                    odds: '',
                    betAmount: 0,
                    showChip: [],
                    total_amount: 0,
                    total_population: 0,
                }, 
				// {
    //                 id: 0,
    //                 label: '小',
    //                 value: 'small',
    //                 className: 'bet-small',
    //                 odds: '',
    //                 betAmount: 0,
    //                 showChip: [],
    //             }, 
				{
                    id: 0,
                    label: '闲',
                    value: 'idle',
                    className: 'bet-idle',
                    odds: '',
                    betAmount: 0,
					imgUrl: '/static/img/live/xian.png',
                    showChip: [],
                    total_amount: 0,
                    total_population: 0,
                }, {
                    id: 0,
                    label: '和',
                    value: 'peace',
                    className: 'bet-peace',
                    odds: '',
					imgUrl: '/static/img/live/he.png',
                    betAmount: 0,
                    showChip: [],
                    total_amount: 0,
                    total_population: 0,
                }, {
                    id: 0,
                    label: '庄',
                    value: 'zhuang',
                    className: 'bet-zhuang',
					imgUrl: '/static/img/live/zhuang.png',
                    odds: '',
                    betAmount: 0,
                    showChip: [],
                    total_amount: 0,
                    total_population: 0,
                }],
				// 投注选择 列表
                chipList: [
                ],
				info: {}, // 台桌信息
				user_info: {}, // 个人信息
				total_money: 0, // 总钱数
                nowSelect: 10, // 当前选中项目
                repeat: [], // 重复下注项目
                noFree: true, // 免佣是否开启
                stopBet: false, // 是否停止下注了
				startBet: false, // 是否 开启下注
				sendFlag:0, // 发送结果到后台次数 
				betSuccess: false,//下注状态
				showBetMoney:false,//展示投注金额
				betMoney: 0,//下注金额
            };
        },
		// 监听事件 
		watch:{
			choiceChips(val, oldVal) { // 筹码选择事件
				this.chipList = val
			},
			tableDataInfo(val){
				this.noFree = val.is_exempt < 1 ? true : false
			}
		},
        mounted() {
			let flag = uni.getStorageSync("sendFlag")
			this.sendFlag = flag ? Number(flag) : 0
			this.chipList = JSON.parse(JSON.stringify(this.choiceChips)) // 数据传递
            this.tableInfo(); // 获取台桌信息
            this.userInfos(); // 获取个人信息
        },
        methods: {
			/**
			 * 设置免佣开
			 * */
			setStopBet(){
				// console.log('endState',this.endState)
				// console.log('sendFlag',this.sendFlag)
				// console.log('stopBet',this.stopBet)
				
				// 如果结束了，重置发送后台次数
				if(this.endState == 0){
					this.sendFlag = 0
					uni.setStorageSync('sendFlag',this.sendFlag)
				}
				// 如果新局开始，并且没有投注记录
				if(this.sendFlag == 0 && this.stopBet == false){
					// console.log('可以切换')
					this.noFree = !this.noFree
					let length = this.betTargetList.length
					this.betTargetList[1].imgUrl = !this.noFree ?  '/static/img/live/lucky.png' : '/static/img/live/lucky2.png'
				}
			},
			/**
			 * 获取台桌信息
			 * */
            tableInfo() {
                let type_id = this.$route.query.type_id;
                this.info.type_id = type_id
                api.desktopTable(this.info).then((res) => {
                    this.loading = false;
                    if (res.data.code == 200) {
                        let resData = res.data.data;
                        resData.forEach((resitem, index) => {
                            // this.betTargetList[index].odds = resitem.odds.replace('|',':')
                            this.betTargetList[index].label = resitem.label
                            this.betTargetList[index].id = resitem.id
							if(index !=0 && index != 4){
								this.betTargetList[index].total_population = resitem.ren
								this.betTargetList[index].total_amount = resitem.money
							}
                            
                        })
					    this.setTotal()
                    } else {
                        this.$tip.alert(res.data.message);
                    }
                })
            },
			/**
			 * 设置模拟人数跟钱数 变成 k 单位
			 * */
			setTotal() {
				if(this.betState) {
					this.betTargetList.forEach(el => {
						el.total_population = el.total_population + Math.floor(Math.random() * (100 - 1)) + 1
						el.total_amount = el.total_amount + Math.floor(Math.random() * (10000 - 1)) + 1
					})
				}
				setTimeout(() => {
					this.setTotal()
				}, 1000)
			},
			/**
			 * 检测用户信息
			 * */
            userInfos() {
                user.getUserInfo().then((res) => {
                    if (res.data.code == 200) {
                        this.user_info = res.data.data
                    } else {
                        this.$tip.alert(res.data.message);
                    }
                })
            },
            // 追加筹码-显示
            oddChip(val, num, list) {
                for (let i = 1; i <= num; i++) {
                    this.chipList.forEach((item, index) => {
                        if (val == item.val) list.push(this.chipList[index])
                    })
                }
            },
            // 获取每种筹码个数
            conversionChip(money) {
				let tem_chip_list = []
				let temChips = this.findMaxChip(money)
                return temChips
            },
			/**
			 * 找出最大筹码
			 * 筛选最大筹码：例：[1,2,10,20,50,100]  总金额：60 那么最大金额为 50
			 * 1 如果总金额等于最大的筹码 选择最大筹码
			 * 2 如果总金额大于最大筹码  总金额-最大的筹码 = 剩余 (用剩余金额 继续第1步）
			 * 3 如果剩余金额等于当前选择的筹码 就用当前选择的筹码
			 * @param {amount} 总金额
			 * @param {tempChips} 选出的筹码列表 
			 * **/
			findMaxChip(amount , tempChips = []) {
				let chip = {}
				let restAmount = 0
				for(let i = 0; i < allChips.length - 1; i++) {
					if(allChips[i].val <=  Number(amount) && allChips[i + 1].val > Number(amount)) {
						chip = allChips[i]
						break
					}else{
						chip = allChips[i + 1]
					}
				}
				restAmount = amount - chip.val
				tempChips.push(chip)
				//如果剩下金额大于最大筹码还得继续找最大筹码
				if(restAmount > 0) {
					this.findMaxChip(restAmount, tempChips)
				}else{
					return tempChips
				}
				return tempChips
			},
			// 当前投注判断
            bet(target) {
                this.userInfos();
				if(this.betSuccess) {
					this.cancel()
				}
				if(!this.betState) {
					this.$tip.alert('非下注时间')
					return
				}
                this.betTargetList.forEach(item => {
					
					// 增加对 非免佣台的过滤 结论 就是 ： 幸运6 正常的，不能压
					if(item.className == 'bet-lucky' && this.noFree == true){
						// 什么都不做了
					}else if (item.value == target.value) {
                        //限制由 后台决定
                        // 添加验证，获取用户金额（判断是否小于下注金额）,或者限额的判断
                        if (this.total_money >= this.user_info.money_balance) {
                            this.$tip.alert('余额不足了');
							return
                        }else if(this.total_money + this.nowSelect > this.user_info.money_balance){
                            this.$tip.alert('余额不足了');
							return
                        } else {
                            this.total_money += Number(this.nowSelect);
                            item.betAmount += Number(this.nowSelect)
                        }
                        item.showChip = []
                        item.showChip = this.conversionChip(item.betAmount)
						this.$emit('betting',{audiName: 'bet.mp3'})
                    }

                })
            },
			// 发送 数据到 后台
            confirm() {
				if(this.betSuccess) {
					return
				}
				// 默认关于免佣的配置
				this.sendFlag++
				uni.setStorageSync('sendFlag',this.sendFlag)
				// 之前的开始
                let confirmData = [];
                this.betTargetList.forEach(item => {
                    if (item.betAmount > 0 && item.id > 0) {
                        confirmData.push({
                            money: item.betAmount,
                            rate_id: item.id,
                        })
                    }
                })
				let is_exempt = this.noFree ? 0:1;
			
                // 发送请求，结束后清空数据
                api.orderTable({
                    'bet': confirmData,
                    'game_type': this.$route.query.type_id,
                    'table_id': this.$route.query.id,
					'is_exempt':is_exempt
                }).then((res) => {
                    if (res.data.code == 200) {
                        // this.cancel()
						this.$emit('betSuccess',{})
						this.$emit('betLoadAudi',{audiName: 'betsuccess.mp3'})
						this.betMoney = res.data.data.money_spend
						this.showBetMoney = true
						setTimeout(() => {
							this.showBetMoney = false
						},1000)
						this.betSuccess = true
                    } else {
                        this.cancel()
						this.$emit('betSuccess',{})
                        this.$tip.alert(res.data.message);
                    }
                })

            },
			// 重复下注 本质是重复上一局的下注
            repeatBet() {
                if (this.repeat.length != 0) {
                    this.betTargetList = [...this.repeat];
                }
                this.confirm();
            },
			// 取消
            cancel() {
				this.betSuccess = false
                this.total_money = 0
                this.betTargetList.forEach(item => {
                    item.betAmount = 0
                    item.showChip = []
                })
            },
			/**
			 * 打开选择筹码
			 * **/
			handleChoice() {
				this.$emit('openMoreChip',true)
			}
        }
    }
</script>

<style lang="scss" scoped>
    .bet-panel{
        position: relative;
		z-index: 9;
    }
    .freeAddress{
        width: 160rpx;
        height: 60rpx;
        // background-color: rgba(0,0,0,.5);
        display: flex;
        align-items: center;
        padding: 8rpx;
        position: absolute;
        z-index: 8;
        right: 0;
        top: -40rpx;
		// background: url(../../static/img/live/game.png);
		// background-size: 2870%;
		// background-position: 11490rpx -10060rpx;
		 
        .free_address_text{
            color: #FFFFFF;
            margin-left: 10rpx;
            font-weight: 800;
        }
    }
    .noFree{
        background-position: 11490rpx -10120rpx;
    }
    
	.bat-chip-mask{
		width: 86rpx;
		height: 76rpx;
		border-radius: 50%;
		position: absolute;
		top: -2rpx;
		left: -2rpx;
		background-color: rgba(0,0,0,.5);
	}
	.bet-zhuang-sizi{
		width: 72rpx !important;
		height: 64rpx !important;
		margin-top: 0rpx;
	}
	.bet-notice{
		position: fixed;
		padding: 0 20rpx;
		padding-left: 76rpx;
		height: 66rpx;
		background-size: 100% 100%;
		width: calc(66rpx * 4.14117);
		top: 200rpx;
		left: 50%;
		transform: translateX(-50%);
		word-break: normal;
		z-index: 99;
		color: #dac193;
		display: flex;
		align-items: center;
		background-image: linear-gradient(to right, black, #454141) ;
		animation:betMoneyNote 500ms;
		-webkit-animation:betMoneyNote 500ms;
		background-image: url(/static/img/live/noticeLogo.png);
	}
	
	@keyframes betMoneyNote{
		from {top:500rpx;}
		to {top:200rpx;}
	}
	
	@-webkit-keyframes betMoneyNote{
		from {top:500rpx;}
		to {top:200rpx;}
	}
    .bet-box {
        height: 276rpx;
		background-color: #004939;
		// background-image: url(/static/img/live/lobby205.png);
		/* border: 1px solid red; */
		// background-size: 584%;
		// background-repeat: no-repeat;
		// background-position: -2236rpx -968rpx;
		// background-position: -1491px -482px;
		.bat-zhuang-six{
			position: absolute;
			right: 10rpx;
			top: 32rpx;
			font-size: 12px;
			color: white;
			transform: scale(0.78);
		}
        .row {
            display: flex;
            justify-content: space-between;

            .title,
            .odds {
                font-weight: 800;
                font-family: '隶书';
            }

            .odds {
                // transform: scale(.8);
            }

            .chip {
                position: absolute;
                // left: calc(50% - 26rpx);
                bottom: 26%;
                width: 52rpx;

                .chip-item {
                    width: 84rpx;
                    height: 72rpx;
                    line-height: 72rpx;
                    text-align: center;
                    border-radius: 50%;
                    color: #000000;
                    transform: scale(.5);
                    transform-origin: 20% 100%;
                    position: absolute;

                    .chip-item-bg {
                        background: url(/static/img/index/chip_all.png) no-repeat;
                        background-size: 98% 100%;
                        font-weight: 600;
                    }

                    .betAmount {
                        width: 100%;
                        position: absolute;
                        font-size: 50rpx;
                        font-weight: 400;
                        color: #e4c678;
                        text-align: center;
                    }
                }
            }

            .total_amount {
                position: absolute;
                bottom: 0;
                left: 10rpx;
                color: #ebd093;
                font-size: 24rpx;
                transform: scale(.8);
                transform-origin: 0 0;
            }

            .total_population {
                position: absolute;
                bottom: 0;
                right: 0;
                color: #ebd093;
                font-size: 24rpx;
                transform: scale(.8);
                transform-origin: 0 0;
            }

            .bet-big,
            .bet-idle-Pair,
            .bet-lucky,
            .bet-zhuang-Pair,
            .bet-small {
                // border: 2rpx solid #CEBAA0;
                text-align: center;
                height: 80rpx;
                line-height: 24rpx;
                font-size: 30rpx;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                position: relative;
            }

            .bet-idle,
            .bet-peace,
            .bet-zhuang {
                // border: 2rpx solid #CEBAA0;
                text-align: center;
                height: 150rpx;
                font-size: 40rpx;
                line-height: 40rpx;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                position: relative;
            }

            .bet-big {
                width: 68rpx;
                border-radius: 16rpx;
                transform: skew(-20deg);
                margin-right: 24rpx;
                color: #2643ff;
            }

            .bet-idle-Pair {
                // width: 180rpx;
				flex: 1;
                // border-radius: 0 16rpx 16rpx 0;
				
                position: relative;
                border-left: none;
                color: #2643ff;
				height: 120rpx;
				border-right: 1px solid #556688;

                .total_amount {
                    left: 0rpx;
                }

                .total_population {
                    right: 10rpx;
                }
            }

            .bet-idle-Pair::before {
                width: 40rpx;
                height: 80rpx;
                border-radius: 16rpx 0 0 16rpx;
                // border: 2rpx solid #CEBAA0;
                // border-bottom: 3.6rpx solid #CEBAA0;
                border-right: none;
                border-top: none;
                position: absolute;
                left: -24rpx;
                top: -4rpx;
                transform: skew(-20deg);
                content: '　';
            }

            .bet-lucky {
                // width: 200rpx;
				flex: 1;
                    /* border-radius: 8px; */
				color: #ff3939;
				height: 120rpx;
				border-right: 1px solid #556688;
            }

            .bet-zhuang-Pair {
                // width: 180rpx;
				flex: 1;
				height: 120rpx;
                border-radius: 16rpx 0 0 16rpx;
                position: relative;
                border-right: none;
                color: #ff3939;
				.odds{
					margin-top: 20rpx;
				}
				.total_amount {
                    left: 20rpx;
                }
                .total_population {
                    // right: -20rpx;
                }
            }

            .bet-zhuang-Pair::after {
                width: 40rpx;
                height: 80rpx;
                border-radius: 0 16rpx 16rpx 0;
                // border: 2rpx solid #CEBAA0;
                // border-bottom: 3.6rpx solid #CEBAA0;
                border-left: none;
                border-top: none;
                // position: absolute;
                right: -24rpx;
                top: -4rpx;
                transform: skew(20deg);
                content: '　';
            }

            .bet-small {
                width: 68rpx;
                border-radius: 16rpx;
                transform: skew(20deg);
                margin-left: 24rpx;
                color: #ff3939;
            }

            .bet-idle {
				flex: 1;
                // width: 288rpx;
                // border-radius: 16rpx 16rpx 16rpx 43%;
				border-right:1px solid #556688 ;
                // transform: skew(-2deg);
                // color: #2643ff;
                .total_amount {
                    left: 80rpx;
                }

                .total_population {
                    // right: 18rpx;
                }
            }

            .bet-peace {
                // width: 200rpx;
				flex: 1;
                // border-radius: 16rpx;
                // color: #78C868;
				border-right:1px solid #556688;
                .total_amount {
                    left: 4rpx;
                }

                .total_population {
                    // right: -4rpx;
                }
            }

            .bet-zhuang {
                // width: 288rpx;
				flex: 1;
                // border-radius: 16rpx 16rpx 43% 16rpx;
                transform: skew(2deg);
                // color: #ff3939;
				color: #eaf4ee;
				font-size: 17px;

                .total_amount {
                    left: 20rpx;
                }

                .total_population {
                    // right: 80rpx;
                }
            }

        }
    }
	.bet-box2{
		background-position: -2982rpx -968rpx;
	}
    .bet-select {
        // height: 164rpx;
        background-color: #2E2E2E;
		background: linear-gradient(to right, #2E2E2E,  black);
        padding: 2rpx;

        .chip-list {
            width: 520rpx;
			height: 80rpx;
            margin: 16rpx auto;
            display: flex;
            align-items: center;
            justify-content: space-between;

            .chip-item {
                width: 84rpx;
                height: 72rpx;
                line-height: 72rpx;
                text-align: center;
                border-radius: 50%;
				position: relative;

                .chip-item-bg {
                    background: url(/static/img/index/chip_all.png) no-repeat;
                    background-size: 98% 100%;
                    font-weight: 600;
                }
            }

            .chip-item-avtive {
                box-sizing: content-box;
                border: 4rpx solid #FBF200;
            }
        }
    }

    .bet-btns {
        display: flex;
        align-items: center;
        margin-top: 12rpx;

        .btn {
            display: flex;
            align-items: center;
            height: 48rpx;
            line-height: 48rpx;
            width: 180rpx;
            border-radius: 28rpx;
            margin-left: 24rpx;
            padding: 4rpx;

            .icon-box {
                width: 40rpx;
                height: 40rpx;
                line-height: 30rpx;
                text-align: center;
                border-radius: 50%;
                border: 4rpx solid rgba(0, 0, 0, .4);
                border-left: none;
                border-bottom: none;
            }
        }
        .reset {
            border: 2rpx solid #ebd093;
            color: #ebd093;
        }

        .determine {
            background-image: linear-gradient(to right, #3BDF4B, #4DBA73);
            color: #FFFFFF;
        }

        .cancel {
            background-image: linear-gradient(to right, #D54449, #C1655B);
            color: #FFFFFF;
        }

        .logo {
			width: 70rpx;
			height: 66rpx;
            margin-left: 20rpx;
            // background: url(/static/img/login/yb12.png) no-repeat;
			background: url(/static/img/live/bet.jpg) no-repeat;
            background-size: 100% 100%;
        }
    }
	.btn-text {
		width: calc(100% - 44rpx);
		text-align: center;
		font-size: 12px;
		transform: scale(0.8);
	}
</style>
